package com.java.dp.factory;

/**
 * @Author lizhilong
 * @create 2019/12/2 17:32
 * @desc  对象工厂
 */
public class SimpleFactory {

    public static BuildLine getFactory(String name) {
        if ("food".equals(name)) {
            return new FoodLine();
        }
        if ("clothes".equals(name)) {
            return new ClothesLine();
        }
        return null;
    }
}
